<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head lang="zh-CN">
    <base href="<%=basePath%>">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>已授权名单</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--<link rel="stylesheet" type="text/css" href="styles.css">-->
	<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
	<script type="text/javascript" src="jquery/1.9.1/jquery.min.js"></script> 
	<script type="text/javascript" src="layer/2.4/layer.js"></script>
	<style type="text/css">
		.round {
		   -moz-border-radius: 10px;      
		   -webkit-border-radius: 10px;  
		   border-radius:10px;            
		}
		#imghead2{
    		width:50px; 
	        height:50px; 
	        border-radius:200px; 
    	}
  	</style>
	<script type="text/javascript">
			function my(){
				var moblie=document.getElementById("moblie").value;
				var yphone=document.getElementById("yphone").value;
				window.location.href="<%=path%>/p/success?userid="+moblie+"&yphone="+yphone;
			}
			function buy(){
				var available=document.getElementById("available").value;
				var existence=document.getElementById("existence").value;
				if(available == existence){
					alert("授权人数到达上限,请点击前往购买");
					var moblie=document.getElementById("moblie").value;
					var yphone=document.getElementById("yphone").value;
					window.location.href="<%=path%>/u/JumpBuy?userid="+moblie+"&yphone="+yphone;
				}else{
					var moblie=document.getElementById("moblie").value;
					window.location.href="<%=path%>/u/JumpRightInformation?userid="+moblie;
				}
			}
			function show(){
				window.location.href="<%=path%>/csh/rightInformation.jsp";
			}
			function renew(){
				alert("续费");
			}
	</script>
  </head>
  <body>
  	<div class="container-fluid">
      <div class="row">
      	<input type="hidden" name="moblie" id="moblie" value="${moblie}">
      	<input type="hidden" name="yphone" id="yphone" value="${yphone}">
     	<table border="0px solid red" width="100%">
     	 	<c:forEach var="v" items="${list}">
     		<tr height="50px">
     			<td width="20%" rowspan="2" align="center"><img  src="${v.yimageurl}" width="50px" height="50px"/></td>
     			<td width="70%">${v.yname}&nbsp;&nbsp;<a href="<%=path%>/v/renew?id=${v.yid}&yphone=${yphone}&userid=${moblie}" style="color: red; font-size: 10px;">${v.yindate}</a></td>
     			<td width="10%" onclick="show()" align="right"><a href="<%=path%>/v/show?id=${v.yid}&yphone=${yphone}"><img src="<%=path%>/csh/image/show.jpg" style="width: 30px; height: 20px; margin-right: 10px;"></a></td>
     		</tr>
     		<tr>
     			<td colspan="2"><font style="font-size: 12px; color: #abb5b8;">
     			授权有效时间:${v.ycreatetime}&nbsp;-&nbsp;${v.state}
     			</font>
     			</td>
     		</tr>
     		<tr height="2%">
     			<td colspan="3"><div style="border: 1px #bbbbbb solid;"></div></td>
     		</tr>
     		</c:forEach> 
     		<tr>
     			<td colspan="3" height="8%" align="center">
     				<div style="width: 200px; height: 50px; line-height:50px; background-color: #49a1f2; color: white;" class="round" onclick="buy()">添加</div>
     			</td>
     		</tr>
     	</table>
     		<input type="hidden" id="available" value="${available}"><input type="hidden" id="existence" value="${existence}">
      </div>
    </div>
  </body>
</html>
